import request from '@/utils/request'

/**
 * 仓库列表
 * @returns 
 */
export function listStore() {
  return request({
    url: '/inventory/storehouse/list',
    method: 'get',
  })
}

/**
 * 入库物品详细信息
 * @param {number} warehouseInInfoId 
 * @returns 
 */
export function warehouseInStockInfo(warehouseInInfoId, goodsType) {
  return request({
    url: '/stock/InStock/list',
    method: 'get',
    params: {
      warehouseInInfoId,
      goodsType
    }
  })
}

/**
 * 修改库存入库
 * @param {number} warehouseInInfoId 
 * @param {number} warehouseId 
 * @param {string} goodsNo 
 * @param {number} number 
 * @returns 
 */
export function updateWarehouseId(warehouseInInfoId, warehouseId, goodsNo, number) {
  return request({
    url: '/stock/InStock/updateWarehouseId',
    method: 'post',
    params: {
      warehouseInInfoId,
      warehouseId,
      goodsNo,
      number
    }
  })
}

/**
 * 修改入库状态
 * @returns 
 */
export function updateWarehouseStatus(warehouseInId) {
  return request({
    url: '/stock/InStock/updateWarehouseStatus',
    method: 'get',
    params: {
      warehouseInId
    }
  })
}